package com.dxy.yzs.marathon.mapper;

import com.dxy.yzs.marathon.domain.PostLabelRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @Entity com.dxy.yzs.marathon.domain.PostLabelRelation
 */
public interface PostLabelRelationMapper extends BaseMapper<PostLabelRelation> {

    @Select("Select username from USER a join user_post_relation b on a.id = b.user_id where b.post_id = #{postId}")
    String getPostUsername(@Param("postId") Integer postId);
}




